package NursE;

import lejos.nxt.NXTRegulatedMotor;

public class NEWheel {
	
	/**
	 * ----------------------------------------------------------------
	 * 								Attributes
	 * ----------------------------------------------------------------
	 */
	
	protected NXTRegulatedMotor motor;
	protected float diameter;

	/**
	 * ----------------------------------------------------------------
	 * 								Static constructor
	 * ----------------------------------------------------------------
	 */
	
	public static NEWheel newWheelWithMotorAndDiameter(NXTRegulatedMotor motor, float diameter) {
		NEWheel wheel = new NEWheel();
		
		wheel.setMotor(motor);
		wheel.setDiameter(diameter);
		
		return wheel;
		
	}

	/**
	 * ----------------------------------------------------------------
	 * 								Setters
	 * ----------------------------------------------------------------
	 */
	
	public void setMotor(NXTRegulatedMotor motor) {
		this.motor = motor;
		
	}
	
	public void setDiameter(float diameter) {
		this.diameter = diameter;
		
	}

	/**
	 * ----------------------------------------------------------------
	 * 								Getters
	 * ----------------------------------------------------------------
	 */
	
	public NXTRegulatedMotor motor() {
		return this.motor;
		
	}
	
	public float diameter() {
		return this.diameter;
	
	}
	
	/**
	 * ----------------------------------------------------------------
	 * 								Movement
	 * ----------------------------------------------------------------
	 */
	
	public void forward() {
		this.motor().forward();
		
	}

	public void backward() {
		this.motor().backward();
		
	}

	public void stop() {
		this.motor().stop();
		
	}


	


}
